package com.hfkh;

/**
 * @Author MDD
 * @Description
 * @Version
 * @Date
 **/
public class Animal {
    public String name;

}

class Cat extends Animal{
    private final String aname;
    public Cat(String name,String aname){
        super.name = name;
        this.aname = aname;
    }

    @Override
    public String toString() {
        return "Cat{" +
                "aname='" + aname + '\'' +
                '}';
    }

    public static void main(String[] args) {
        Animal cat = new Cat("动物","喵星人");
        System.out.println(cat);
    }
}


















